<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width">
  <title>MathJax v3 loaded only if there is math</title>
  <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
  <script src="load-mathjax.js" defer></script>
</head>
<body>

This is math: $x+1\over x-1$

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mi>x</mi>
</math>

</body>
</html>